home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 3904 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: mail2news.demon.co.uk!genesis.demon.co.uk
  2. From: Lawrence Kirby <fred@genesis.demon.co.uk>
  3. Newsgroups: comp.lang.c
  4. Subject: Re: division problem
  5. Date: Wed, 31 Jan 96 20:04:52 GMT
  6. Organization: none
  7. Message-ID: <823118692snz@genesis.demon.co.uk>
  8. References: <31097D77.11AA@rain.org> <26JAN199622082450@erich.triumf.ca> <4eh246$u6h@airdmhor.gen.nz> <4ej4ha$66@fountain.mindlink.net> <DLzvGG.2rn@uns.bris.ac.uk> <4emuba$1mo@fountain.mindlink.net>
  9. Reply-To: fred@genesis.demon.co.uk
  10. X-NNTP-Posting-Host: genesis.demon.co.uk
  11. X-Newsreader: Demon Internet Simple News v1.27
  12. X-Mail2News-Path: genesis.demon.co.uk
  13.  
  14. In article <4emuba$1mo@fountain.mindlink.net>
  15.            genew@mindlink.bc.ca "Gene Wirchenko" writes:
  16.  
  17. >>Still no need to use floating point,
  18. >>celcius = ((fahrenheit - 32) * 5 + 4) / 9
  19. >
  20. >     Let's assume that you had never run across fahrenheit to celsius
  21. >conversion before (because the above could just as easily be a case of
  22. >converting flibbles to meeblesnauzers).
  23. >
  24. >     Can you derive the ORIGINAL formula for conversion of F to C?
  25. >
  26. >     If yes, how?  Because you don't know what the 4 is for.
  27.  
  28. Maybe not but its effect is clearly one of rounding. Perhaps it would be
  29. clearer to specify it as (9/2), perhaps not.
  30.  
  31. >     If no, then it's unclear code, isn't it?
  32.  
  33. How would you express it more clearly?
  34.  
  35. -- 
  36. -----------------------------------------
  37. Lawrence Kirby | fred@genesis.demon.co.uk
  38. Wilts, England | 70734.126@compuserve.com
  39. -----------------------------------------
  40.